<?php

# CONFIG.PHP
# This page holds all common variables and configs for ADMIN page
# Include in every pages


if (!defined('INDEX')) exit;

// Extend session length
ini_set('session.gc_maxlifetime',60*60*10);

// Display errors (do not display notice)
//error_reporting (E_ALL & ~E_NOTICE) ;
error_reporting (0) ;

##### start ADMIN CONFIG (EDITABLE) ##############################################################
// Language for admin area
$cfg['admin_header'] = 'Administrator'; // display at the header of every page
$cfg['admin_language'] = "en"; // "en" or "vn"
$cfg['upload_folder'] = 'static/upload/'; // Folder for uploading files, images from admin interface (must have slash / )
$cfg["support_email"] = "jboatws@yahoo.com"; // Email for admin supporting

$cfg['default_account'] = 31; // use default account
$cfg["use_gd"] = 0; // use GD function, if not, set to 0
$cfg["max_thumb_width"] = 250; // use GD
$cfg["max_thumb_height"] = 250; // use GD
$cfg["time_redirect"] = 1; // seconds
$cfg["session_timeout"] = 60*60*10; // Seconds

$cfg['menu_scrolling'] = 'no'; //yes, no or auto
$cfg['menu_width'] = 160; // pixels
$cfg['default_charset'] = 'utf-8';
$cfg['debug_enable'] = 1; // 0 or 1

$cfg["editing_same"] = 1; // Allow edit same content
$cfg["editing_timeout"] = 5*60; // Seconds

$cfg["enable_hotkeys"] = 0; // 1 or 0
$cfg['multi_language'] = 0; // 1 or 0

// Modules
# module_name =>  Module title => show content url,
#						Add category title => add category url
#						Add content title => add content url
$module = array(
	######################## QUAN LY TIN DANG ########################
    'menu_title1' => array('Danh mục'=>''),
    'manufacture' => array(
							"Quản lý manufacture" => "admin.php?mdl=manufacture&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							"Tạo mới" => "admin.php?mdl=manufacture&p=add_content",
						),
    'model' => array(
							"Quản lý model" => "admin.php?mdl=model&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							"Tạo mới" => "admin.php?mdl=model&p=add_content",
						), 
    'style' => array(
							"Quản lý style" => "admin.php?mdl=style&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							"Tạo mới" => "admin.php?mdl=style&p=add_content",
						),                                               
    'city' => array(
							"Quản lý Thành phố" => "admin.php?mdl=city&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							"Tạo mới" => "admin.php?mdl=city&p=add_content",
						),
    'price' => array(
							"Quản lý price" => "admin.php?mdl=price&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							"Tạo mới" => "admin.php?mdl=price&p=add_content",
						),                        
    'alert' => array(
							"Quản lý alert" => "admin.php?mdl=alert&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							//"Tạo mới" => "admin.php?mdl=alert&p=add_content",
						),                    
    'menu_title2' => array('Tracking Manager'=>''),
    
    'tracking-alert' => array(
							"Alert" => "admin.php?mdl=tracking-alert&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							//"Tạo mới" => "admin.php?mdl=alert&p=add_content",
						),
                        
	'menu_title3' => array('Content Manager'=>''),
    'contact' => array(
							"Liên hệ" => "admin.php?mdl=contact&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							//"Tạo mới" => "admin.php?mdl=user&p=add_content",
						),
    'user' => array(
							"Quản lý thành viên" => "admin.php?mdl=user&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							//"Tạo mới" => "admin.php?mdl=user&p=add_content",
						),
                        
    'car' => array(
							"Quản lý mua bán xe" => "admin.php?mdl=car&p=show",
							//"Add new category" => "admin.php?mdl=adv&p=add_cat",
							"Tạo mới" => "admin.php?mdl=car&p=add_content",
						),
    'payment' => array(
							"Quản lý thanh toán" => "admin.php?mdl=payment&p=show",
							
							
						),                        
                            
); 

// jCAS add-on modules (delete un-used modules)
$sub_module = array(
//	"content" => array("<strong>Manage Contents</strong>" => "admin.php?mdl=content&p=show"),
//	'jcas_language' => array("Site languages" => "admin.php?mdl=jcas_language"),
	'jcas_site_config' => array("Site configs" => "admin.php?mdl=jcas_site_config"),
	'jcas_admin' => array("Admin accounts" => "admin.php?mdl=jcas_admin"),
//	'jcas_stats' => array("Website statistics" => "admin.php?mdl=jcas_stats"),
	'jcas_upload' => array("Upload files" => "admin.php?mdl=jcas_upload"),
	'jcas_database' => array("Database monitor" => "admin.php?mdl=jcas_database"),
	'jcas_support' => array("Admin support" => "admin.php?mdl=jcas_support"),
);

##### end ADMIN (EDITABLE) ######################################################################

##### start COMMON VARIABLES (DO NOT EDIT) ##################################
// Table names (rename if you use other names)
$tbl['admin_sessions'] = 'jcas_admin_session';
$tbl['admin_accounts'] = 'jcas_admin';
$tbl['admin_log'] = 'jcas_admin_log';
$tbl['site_config'] = 'jcas_site_config';
$tbl['language'] = 'jcas_language';
$tbl['visitor'] = 'jcas_visitor';
$tbl['session'] = 'jcas_session';
$tbl['page_hit'] = 'jcas_page_hit';

// URL variables
$index_url = 'admin.php?sid='.session_id().'&mdl='.$_GET["mdl"];

// Default variables
if(!$show_content) $show_content = true;
if(!$_GET["pg"]) $_GET["pg"] = 1;
if(!$_GET["mdl"]) $_GET["mdl"] = 'jcas_home';
if(!$_GET["p"]) $_GET["p"] = "show";

// Date & time (always store GMT times, use show_date() instead of date())
$time = time(); // gmt(time());

// Email headers
$cfg["email_headers"] = "MIME-Version: 1.0
Content-type: text/html; charset= utf-8
Content-Transfer-Encoding: 7bit
";
##### end COMMON VARIABLES (DO NOT EDIT) ##################################
?>